
<template>
    <div>
        <h1>HomeContainer</h1>
        <!--轮播-->
        <mt-swipe :auto="4000" class='swiper_container'>
			<mt-swipe-item>1</mt-swipe-item>
			<mt-swipe-item>2</mt-swipe-item>
			<mt-swipe-item>3</mt-swipe-item>
		</mt-swipe>
		<!--
		通过接口获取到的数据存放在lunbotulist这个数组中 用v-for循环渲染在页面中
		<mt-swipe :auto="4000" class='swiper_container'>
			<mt-swipe-item v-for='item in lunbotulist' :key='item.url'>1
                 <img :src='item.img'>  
			</mt-swipe-item>
		</mt-swipe>
		-->
            <!--九宫可 改造 六宫格-->
		        <ul class="mui-table-view mui-grid-view mui-grid-9">
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
		                <a href="#">
		                    <img src='../../images/menu1.png'/>
		                    <div class="mui-media-body">Home</div>
		                </a>
		            </li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
		                <a href="#">
		                   <img src='../../images/menu2.png'/>
		                   <div class="mui-media-body">Email</div>
		                </a>
		            </li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
		                <a href="#">
		                   <img src='../../images/menu3.png'/>
		                   <div class="mui-media-body">Chat</div>
		                </a>

		            </li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
		                <a href="#">
		                    <img src='../../images/menu4.png'/>
		                    <div class="mui-media-body">location</div>
		                </a>
		            </li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
		                <a href="#">
		                    <img src='../../images/menu5.png'/>
		                    <div class="mui-media-body">Search</div>
		                </a>
		            </li>
		        <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
		                <a href="#">
		                    <img src='../../images/menu6.png'/>
		                    <div class="mui-media-body">Phone</div>
		                </a>
		        </li>
		          
		     </ul> 
    </div>
</template>


<script>
    import { Toast } from 'mint-ui'
    export default{
        data(){
            return{
               //lunbotulist:[]  //保存轮播图的数组
            }
        },
        created(){
          //this.getLunbotu();//调用这个方法
        },
        methods:{
            //getLunbotu(){// 这是个获取轮播图的方法
                //this.$http.get('http://vue.studyit.io/api/getlunbo').then(result => {
                    //console.log(result.body)
                    //if(result.body.status===0){
                        //this.lunbotulist = result.body.message//获取到的数据放在提前准备的data数据中 用于使用
                        //Toast("加载图片成功...")
                    //}else{
                        //Toast("加载图片失败...")
                    //}
                //})
            //}
        }
    }

</script>



<style lang="scss" scoped>
    .mint-swipe{
       height:200px;
       .mint-swipe-item{
          &:nth-child(1){
            background-color:red;
          }
          &:nth-child(2){
            background-color:blue;
          }
          &:nth-child(3){
            background-color:green;
          }
       }
    }
    .mui-grid-view.mui-grid-9 {
      background-color:#fff;
      border:none;
      img{
        width:100%;
        height:100%;
      }

    }
    .mui-grid-view.mui-grid-9 .mui-table-view-cell {
       border:none;
    }
</style>